import http from "@/utils/request"
//获取类目
export let getCategoryApi = () => http.get('/category/getCategory')
//增加类目
export const addCategory = (data: { categoryName: string, categoryImgurl: string }) => http.post('/category/addCategory', data)

//上传类目图片

// export const uploadCategoryImg = () => http.post('/students/uploadStuAvatar')

//删除类目

export let deleteCategory = (category_id: string) => http.get('/category/delCategory', {
    params: {
        category_id,
    }
})
//修改类目
export let updateCategory = (data: { category_id: string, categoryName: string }) => http.post("/category/updateCategory", data)